From c12a64f99f897a2a31b42d5de9a87339d927a0c6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 9 Oct 2014 08:17:41 -0700 Subject: [PATCH] Update dependencies and update to rust master --- Cargo.lock | 48 +++++++++++++++++------------------ src/cargo/core/registry.rs | 6 ++--- src/cargo/sources/registry.rs | 2 +- src/cargo/util/sha256.rs | 4 +-- tests/test_cargo_registry.rs | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 31116a819..4da407c77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,33 +2,33 @@ name = "cargo" version = "0.0.1-pre" dependencies = [ - "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)", + "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#d687ccb2fdc8d256555a8c9d4c92f08342135e07)", "docopt 0.6.4 (git+https://github.com/docopt/docopt.rs#21ce1190ef7631f71e52de5e13eb4d131564b82e)", "docopt_macros 0.6.4 (git+https://github.com/docopt/docopt.rs#21ce1190ef7631f71e52de5e13eb4d131564b82e)", - "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d)", - "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#0e068d21edbb1fb250b4350f314f1e06d7467c77)", + "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#9be9775d3f50e961a2f99728b3de8d819f3939be)", + "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#602d1c5ceffc20fbbb16364b142c32f8b3bdb177)", "glob 0.0.1 (git+https://github.com/rust-lang/glob#27338cbd4736d3c8146294fc090c6f8f06c32d72)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b8622d54587590f324b97cc98)", "semver 0.1.0 (git+https://github.com/rust-lang/semver#5dee918159d4e3d84c1ee54cf6a5305e6f7bd557)", - "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#e7c9952ea75a75688966b516d8bbefb740f54208)", - "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f)", - "url 0.1.0 (git+https://github.com/servo/rust-url#f320b1e64d5caaf3cf4a31c8960f646ff7e865f7)", + "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#943d7c0173c7fa5e8c58978add0180569c68d7f7)", + "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#05c1eb420f54569336b8481c28a46b5a7c51ec99)", + "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", ] [[package]] name = "curl" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4" +source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#d687ccb2fdc8d256555a8c9d4c92f08342135e07" dependencies = [ - "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)", + "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#d687ccb2fdc8d256555a8c9d4c92f08342135e07)", "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6040330f2903ca891d2)", - "url 0.1.0 (git+https://github.com/servo/rust-url#f320b1e64d5caaf3cf4a31c8960f646ff7e865f7)", + "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", ] [[package]] name = "curl-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4" +source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#d687ccb2fdc8d256555a8c9d4c92f08342135e07" [[package]] name = "docopt" @@ -46,20 +46,20 @@ dependencies = [ [[package]] name = "encoding" version = "0.1.0" -source = "git+https://github.com/lifthrasiir/rust-encoding#ea41c0226067331a4d13142c81d82b614135c82a" +source = "git+https://github.com/lifthrasiir/rust-encoding#ff55916fec8b5bf8667a74d5a060c8c951f28fe0" [[package]] name = "flate2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d" +source = "git+https://github.com/alexcrichton/flate2-rs#9be9775d3f50e961a2f99728b3de8d819f3939be" [[package]] name = "git2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#0e068d21edbb1fb250b4350f314f1e06d7467c77" +source = "git+https://github.com/alexcrichton/git2-rs#602d1c5ceffc20fbbb16364b142c32f8b3bdb177" dependencies = [ - "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#0e068d21edbb1fb250b4350f314f1e06d7467c77)", - "url 0.1.0 (git+https://github.com/servo/rust-url#f320b1e64d5caaf3cf4a31c8960f646ff7e865f7)", + "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#602d1c5ceffc20fbbb16364b142c32f8b3bdb177)", + "url 0.1.0 (git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b)", ] [[package]] @@ -75,17 +75,17 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b86 [[package]] name = "libgit2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#0e068d21edbb1fb250b4350f314f1e06d7467c77" +source = "git+https://github.com/alexcrichton/git2-rs#602d1c5ceffc20fbbb16364b142c32f8b3bdb177" dependencies = [ - "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#e084c0e08e202e813a23e228acc322b77eb308b2)", + "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#80e71a3021618eb05656c58fb7c5ef5f12bc747f)", "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6040330f2903ca891d2)", - "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys#b46ca510c5b0bf8215eeabfa5696932f9acb63b1)", + "openssl-static-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-static-sys#b01801397328924055fb1c7c87fd5bf18907e511)", ] [[package]] name = "libssh2-static-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/libssh2-static-sys#e084c0e08e202e813a23e228acc322b77eb308b2" +source = "git+https://github.com/alexcrichton/libssh2-static-sys#80e71a3021618eb05656c58fb7c5ef5f12bc747f" [[package]] name = "link-config" @@ -95,7 +95,7 @@ source = "git+https://github.com/alexcrichton/link-config#0afbf50ba545ac379292b6 [[package]] name = "openssl-static-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/openssl-static-sys#b46ca510c5b0bf8215eeabfa5696932f9acb63b1" +source = "git+https://github.com/alexcrichton/openssl-static-sys#b01801397328924055fb1c7c87fd5bf18907e511" [[package]] name = "semver" @@ -105,18 +105,18 @@ source = "git+https://github.com/rust-lang/semver#5dee918159d4e3d84c1ee54cf6a530 [[package]] name = "tar" version = "0.0.1" -source = "git+https://github.com/alexcrichton/tar-rs#e7c9952ea75a75688966b516d8bbefb740f54208" +source = "git+https://github.com/alexcrichton/tar-rs#943d7c0173c7fa5e8c58978add0180569c68d7f7" [[package]] name = "toml" version = "0.1.0" -source = "git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f" +source = "git+https://github.com/alexcrichton/toml-rs#05c1eb420f54569336b8481c28a46b5a7c51ec99" [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#f320b1e64d5caaf3cf4a31c8960f646ff7e865f7" +source = "git+https://github.com/servo/rust-url#55b18b796ef2cef5490069dd450c60c2cc2c0c1b" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#ea41c0226067331a4d13142c81d82b614135c82a)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#ff55916fec8b5bf8667a74d5a060c8c951f28fe0)", ] diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index 807ca2e3b..5d95bcb15 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -80,7 +80,7 @@ impl<'a> PackageRegistry<'a> { Ok(()) } - fn load(&mut self, source_id: &SourceId, override: bool) -> CargoResult<()> { + fn load(&mut self, source_id: &SourceId, is_override: bool) -> CargoResult<()> { (|| { let mut source = source_id.load(self.config); @@ -89,7 +89,7 @@ impl<'a> PackageRegistry<'a> { try!(source.update()); drop(p); - if override { + if is_override { self.overrides.push(source_id.clone()); } @@ -169,7 +169,7 @@ pub mod test { self } - pub fn override(mut self, summary: Summary) -> RegistryBuilder { + pub fn add_override(mut self, summary: Summary) -> RegistryBuilder { self.overrides.push(summary); self } diff --git a/src/cargo/sources/registry.rs b/src/cargo/sources/registry.rs index 9165d50b7..7571cf645 100644 --- a/src/cargo/sources/registry.rs +++ b/src/cargo/sources/registry.rs @@ -138,7 +138,7 @@ impl<'a, 'b> RegistrySource<'a, 'b> { let actual = { let mut state = Sha256::new(); state.update(resp.get_body()); - state.final() + state.finish() }; if actual.as_slice().to_hex() != *expected { return Err(human(format!("Failed to verify the checksum of `{}`", diff --git a/src/cargo/util/sha256.rs b/src/cargo/util/sha256.rs index cce484613..294bdbaba 100644 --- a/src/cargo/util/sha256.rs +++ b/src/cargo/util/sha256.rs @@ -48,7 +48,7 @@ mod imp { } } - pub fn final(&mut self) -> [u8, ..32] { + pub fn finish(&mut self) -> [u8, ..32] { unsafe { let mut ret = [0u8, ..32]; let mut out = 0; @@ -141,7 +141,7 @@ mod imp { }) } - pub fn final(&mut self) -> [u8, ..32] { + pub fn finish(&mut self) -> [u8, ..32] { let mut ret = [0u8, ..32]; let mut len = ret.len() as libc::DWORD; call!(unsafe { diff --git a/tests/test_cargo_registry.rs b/tests/test_cargo_registry.rs index 3101d05b7..944c25572 100644 --- a/tests/test_cargo_registry.rs +++ b/tests/test_cargo_registry.rs @@ -19,7 +19,7 @@ fn dl_url() -> Url { Url::from_file_path(&dl_path()).unwrap() } fn cksum(s: &[u8]) -> String { let mut sha = Sha256::new(); sha.update(s); - sha.final().to_hex() + sha.finish().to_hex() } fn setup() { -- 2.30.2